<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ShopCartModel extends Model
{
    use HasFactory;
    protected $table='shop_cart';
    protected $primaryKey='cart_id';
    function cartInfo(){
        return $this->hasOne(ShopModel::class,'shop_id','shop_num')->select(['shop_id','shop_nick','shop_price','shop_logo']);
    }
}
